package com.cloud.api.domain.tsp;

import com.cloud.api.utils.ExcelUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.Date;
@Data
@ExcelUtils.ExcelSheet(watermark = @ExcelUtils.Watermark(type = 0)
)
public class VehicleSaleExcel {


    @Schema(description = "用于导出错误数据")
    @ExcelUtils.ExcelExport(name = "table.field.errResult")
    private String errResult;

    @Schema(description = "序号")
    @ExcelUtils.ExcelImport(name = "table.field.num")
    @ExcelUtils.ExcelExport(name = "table.field.num")
    private String num;

    @ExcelUtils.ExcelImport(name = "table.field.*vin")
    @ExcelUtils.ExcelExport(name = "table.field.*vin")
    @Size(max = 17,min = 17,message = "{validation.Information.vinSizeExcel}")
    private String vin;

    @Schema(description = "销售日期")
    @ExcelUtils.ExcelImport(name = "table.field.*saleDate")
    @ExcelUtils.ExcelExport(name = "table.field.*saleDate")
    @NotNull(message = "{validation.sale.saleDate}")
    private Date saleDate;

    @Schema(description = "车主姓名")
    @ExcelUtils.ExcelImport(name = "table.field.*carOwner")
    @ExcelUtils.ExcelExport(name = "table.field.*carOwner")
    @Size(max = 10,message = "{validation.sale.carOwnerSize}")
    @NotEmpty(message = "{validation.owner.owner}")
    private String carOwner;

    @Schema(description = "车主电话")
    @ExcelUtils.ExcelImport(name = "table.field.*carPhone")
    @ExcelUtils.ExcelExport(name = "table.field.*carPhone")
    @NotEmpty(message = "{validation.sale.phoneNumber}")
    private String phoneNumber;

    @Schema(description = "车牌号")
    @ExcelUtils.ExcelImport(name = "table.field.licenseNumber")
    @ExcelUtils.ExcelExport(name = "table.field.licenseNumber")
    @Size(max = 8,min = 7,message = "{validation.sale.licenseNumberSize}")
    private String licenseNumber;

    @Schema(description = "省")
    @ExcelUtils.ExcelImport(name = "table.field.*province")
    @ExcelUtils.ExcelExport(name = "table.field.*province")
    @NotEmpty(message = "{validation.common.province}")
    private String province;

    @Schema(description = "市")
    @ExcelUtils.ExcelImport(name = "table.field.*city")
    @ExcelUtils.ExcelExport(name = "table.field.*city")
    @NotEmpty(message = "{validation.common.city}")
    private String city;

    @Schema(description = "区")
    @ExcelUtils.ExcelImport(name = "table.field.*district")
    @ExcelUtils.ExcelExport(name = "table.field.*district")
    @NotEmpty(message = "{validation.common.district}")
    private String district;

}
